package com.cmc.cloud.cmclink.doc.convert;

import com.cmc.cloud.cmclink.doc.api.document.rep.SoDetailCompareRespDto;
import com.cmc.cloud.cmclink.doc.api.document.rep.SoDetailRespDto;
import com.cmc.cloud.cmclink.doc.api.document.req.AttachmentUpdateReqDto;
import com.cmc.cloud.cmclink.doc.api.document.req.so.UpdateConfirmedSoAmendCodDto;
import com.cmc.cloud.cmclink.doc.entity.AttachmentDO;
import com.cmc.cloud.cmclink.doc.vo.sovo.attachmentvo.AttachmentCreateReqVO;
import com.cmc.cloud.cmclink.doc.vo.sovo.attachmentvo.AttachmentRespVO;
import com.cmc.cloud.cmclink.doc.vo.sovo.attachmentvo.AttachmentUpdateReqVO;
import com.cmc.cloud.cmclink.doc.vo.sovo.sovo.SoCreateAndUpdateReqVo;
import com.cmc.cloud.cmclink.doc.vo.sovo.sovo.SoDetailCompareRespVo;
import com.cmc.cloud.cmclink.doc.vo.sovo.sovo.SoDetailRespVO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 订舱附件表 提单附件表 单证所有附件都保存在这张表 通过类型区分 Convert
 *
 * @author 招商轮船-管理员
 */
@Mapper
public interface AttachmentConvert {

    AttachmentConvert INSTANCE = Mappers.getMapper(AttachmentConvert.class);


    /**
     * 属性转换 convert
     *
     * @param bean
     * @return
     */
    AttachmentDO convert(AttachmentCreateReqVO bean);

    /**
     * 属性转换 convert
     *
     * @param bean
     * @return
     */
    List<AttachmentDO> convertBatchUpdate(List<AttachmentUpdateReqVO> bean);

    /**
     * 属性转换 convert
     *
     * @param bean
     * @return
     */
    List<AttachmentDO> convertBatch(List<AttachmentCreateReqVO> bean);

    /**
     * 属性转换 convert
     *
     * @param bean
     * @return AttachmentDO
     */
    AttachmentDO convert(AttachmentUpdateReqVO bean);

    /**
     * 属性转换 convert
     *
     * @param bean
     * @return 属性转换
     */
    AttachmentRespVO convert(AttachmentDO bean);

    /**
     * 属性转换 convert
     *
     * @param list
     * @return
     */
    List<AttachmentRespVO> convertList(List<AttachmentDO> list);

    /**
     * 属性转换 convert
     *
     * @param list
     * @return
     */
    List<AttachmentDO> convertDoList(List<AttachmentRespVO> list);

    /**
     * 属性转换 convert
     *
     * @param list
     * @return
     */
    List<AttachmentCreateReqVO> convertCreateList(List<AttachmentDO> list);

    /**
     * 属性转换
     *
     * @param attachmentUpdateReqDtoList
     * @return
     */
    List<AttachmentUpdateReqVO> convertAttachmentUpdateReqDto(List<AttachmentUpdateReqDto> attachmentUpdateReqDtoList);
    /**
     * 属性转换
     *
     * @param attachmentUpdateReqVOList
     * @return
     */
    List<AttachmentUpdateReqDto> convertAttachmentUpdateReqVO(List<AttachmentUpdateReqVO> attachmentUpdateReqVOList);

    /**
     * 属性转换
     *
     * @param attachmentDoList
     * @return
     */
    List<AttachmentUpdateReqDto> convertAttachmentUpdateReqDtos(List<AttachmentDO> attachmentDoList);
    /**
     * 属性转换
     *
     * @param soDetailCompareRespVo
     * @return
     */
    SoDetailCompareRespDto convertSoDetailCompareRespDto(SoDetailCompareRespVo soDetailCompareRespVo);
    /**
     * 属性转换
     *
     * @param soDetailRespVO
     * @return
     */
    SoDetailRespDto convertSoDetailRespDto(SoDetailRespVO soDetailRespVO);
    /**
     * 属性转换
     *
     * @param updateConfirmedSoAmendCodDto
     * @return
     */
    SoCreateAndUpdateReqVo convertSoCreateAndUpdateReqVo(UpdateConfirmedSoAmendCodDto updateConfirmedSoAmendCodDto);
}
